home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Arsenal
/
OS2 Arsenal v1.0 (Disc 2)(Arsenal Computer).ISO
/
os2_inet
/
progcsd.exe
/
UTILS.H
< prev
next >
Wrap
Text File
|
1993-02-24
|
3KB
|
68 lines
/********************************************************copyrite.xic***/
/* */
/* Licensed Materials - Property of IBM */
/* */
/* This product contains "Restricted Materials of IBM": */
/* Program Number: 5798RXW */
/* Program Name: IBM TCP/IP Version 1.2 for OS/2 */
/* (C) Copyright IBM Corporation. 1990, 1991. */
/* */
/* All rights reserved. */
/* */
/* US Government Users Restricted Rights - */
/* Use, duplication or disclosure restricted by GSA ADP Schedule */
/* Contract with IBM Corp. */
/* */
/* See IBM Copyright Instructions. */
/* */
/********************************************************copyrite.xic***/
#ifndef __32BIT__
#define _Far16
#define _Cdecl
#endif
u_long _Far16 _Cdecl lswap( u_long );
u_short _Far16 _Cdecl bswap( u_short );
#define htonl(x) (lswap(x))
#define ntohl(x) (lswap(x))
#define htons(x) (bswap(x))
#define ntohs(x) (bswap(x))
#define bzero(x,y) memset((x),0,(y))
#ifdef KERNEL
#define bcopy(x,y,z) mymemcpy((y),(x),(z))
#else
#define bcopy(x,y,z) memcpy((y),(x),(z))
#endif
#define ovbcopy(x,y,z) bcopy((x),(y),(z))
#define copyout(x,y,z) memcpy((y),(x),(z))
#define bcmp(x,y,z) memcmp((y),(x),(z))
#define strcasecmp(x,y) strcmpi((x),(y))
#define strncasecmp(x,y,z) strnicmp(x,y,z)
#ifndef KERNEL
#define sleep(x) DOSSLEEP(((long)(x))*1000L)
#endif
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
#define imin(x,y) MIN((x),(y))
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif
#ifndef min
#define min(a,b) (((a)<(b))?(a):(b))
#endif
#ifndef FP_SEG
#define FP_SEG(fp) (*((unsigned *)&(fp)+1))
#endif
#ifndef FP_OFF
#define FP_OFF(fp) (*((unsigned *)&(fp)))
#endif
#define timercmp(t1,t2,op) (((t1)->tv_sec op (t2)->tv_sec) || \
(((t1)->tv_sec == (t2)->tv_sec) \
&& ((t1)->tv_usec op (t2)->tv_usec)))
#define random() ((u_long)rand())
#define srandom(x) srand(x)